//included by stadfx.h
// TODO: reference additional headers your program requires here

#define  NOMINMAX
#define  NODRAWTEXT

#include <d3d11.h>
#include <d3dx11.h>

#pragma comment(lib,"d3d11.lib")
#pragma comment(lib,"d3dx11.lib")
#pragma comment(lib,"d3dcompiler.lib")
#include <assert.h>
#include <sstream>
#define trace( text )\
{\
	std::wstringstream stringBuilder;\
	stringBuilder << text << std::endl;\
	OutputDebugString(stringBuilder.str().c_str());\
}


#define  errorMsg( _text, _title )\
{\
	std::wstringstream text,title;\
	text<< _text << std::endl;\
	title<< _title << std::endl;\
	MessageBox(NULL, text.str().c_str(), title.str().c_str(),MB_OK|MB_ICONERROR);\
}

#define  errorMsg_char( _text, _title )\
{\
	MessageBoxA(NULL, _text , _title, MB_OK|MB_ICONERROR);\
}

#define HV(rt) if(FAILED(rt)){assert(0);}
///*errorMsg(L"error code: "<<rt,L"DX error");*/
#define Exit(errorStr) { errorMsg_char(errorStr,"Exit"); exit(0);}

#include "d3dx11effect.h"
#pragma comment(lib,"Effects11.lib")